
   
	<cfcomponent displayname="lib Service" hint="">

	<cffunction name="init" access="public" returntype="libService" output="false">

		<cfreturn this/>

	</cffunction>

	<cffunction name="setlibGateway" returntype="void" access="public" output="false" hint="dependency: libGateway">
		<cfargument name="libGateway" type="libGateway" required="true"/>
		<cfset variables.m_libGateway = arguments.libGateway/>
	</cffunction>

	<cffunction name="setlibDAO" returntype="void" access="public" output="false" hint="dependency: libDAO">
		<cfargument name="libDAO" type="libDAO" required="true"/>
		<cfset variables.m_libDAO = arguments.libDAO/>
	</cffunction>

	<cffunction name="getAll" returntype="query" access="public" output="false" hint="I retrieve all existing lib">

		<cfreturn variables.m_libGateway.getAll()/>
	</cffunction>

	<cffunction name="getById" returntype="any" access="public" output="false" hint="I retrieve a lib">
		<cfargument name="Id" type="numeric" required="true"/>
		<cfreturn variables.m_libDAO.read(arguments.Id)/>
	</cffunction>

	<cffunction name="save" returntype="any" access="public" output="false" hint="I save a lib">
		<cfargument name="lib" type="lib" required="true"/>
		<cfreturn variables.m_libDAO.save(arguments.lib)/>
	</cffunction>

	<cffunction name="remove" returntype="void" access="public" output="false" hint="I remove a lib">
		<cfargument name="lib" type="lib" required="true"/>
		<cfreturn variables.m_libDAO.remove(arguments.lib)/>
	</cffunction>
	
	<cffunction name="getByUserID" access="public" returntype="query" output="false" displayname="" hint="">
		<cfargument name="userID" type="string" required="true" />
		
		<cfreturn variables.m_libGateway.getByUserID(arguments.userid)/>
	</cffunction>
	
</cfcomponent>
	
  
